package com.it.mapper;


import com.it.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Insert("insert into user(username,password) values(#{username},#{password})")
    void save(@Param("username") String username, @Param("password") String password);

    @Select("select * from user where id = #{id}")
    User findUserById(@Param("id") Integer id);

    @Select("select * from user")
    List<User> findUserList();

}
